package cores.colorwheel;
import cores.colorwheel.Color.sector;
import java.util.ArrayList;
import java.util.*;

public class ThreeComplementary {
	
	Color c1, c2, c3;
	
	public ThreeComplementary(Color c1, Color c2, Color c3) {
		this.c1 = c1;
		this.c2 = c2;
		this.c3 = c3;
	}
	
	public boolean isComplementary() {
		if (c1.getSector() == sector.Amarelo && c2.getSector() == sector.Vermelho && c3.getSector() == sector.Azul ||
				c2.getSector() == sector.Amarelo && c3.getSector() == sector.Vermelho && c1.getSector() == sector.Azul ||
				c3.getSector() == sector.Amarelo && c1.getSector() == sector.Vermelho && c2.getSector() == sector.Azul) {
		return true;
		} else if (c1.getSector() == sector.AmareloAlaranjado && c2.getSector() == sector.VermelhoVioleta && c3.getSector() == sector.AzulEsverdeado ||
				c2.getSector() == sector.AmareloAlaranjado && c3.getSector() == sector.VermelhoVioleta && c1.getSector() == sector.AzulEsverdeado ||
				c3.getSector() == sector.AmareloAlaranjado && c1.getSector() == sector.VermelhoVioleta && c2.getSector() == sector.AzulEsverdeado) {
			return true;
		} else if (c1.getSector() == sector.Laranja && c2.getSector() == sector.Violeta && c3.getSector() == sector.Verde ||
				c2.getSector() == sector.Laranja && c3.getSector() == sector.Violeta && c1.getSector() == sector.Verde ||
				c3.getSector() == sector.Laranja && c1.getSector() == sector.Violeta && c2.getSector() == sector.Verde) {
			return true;
		} else if (c1.getSector() == sector.VermelhoAlaranjado && c2.getSector() == sector.AzulVioleta && c3.getSector() == sector.AmareloEsverdeado ||
				c2.getSector() == sector.VermelhoAlaranjado && c3.getSector() == sector.AzulVioleta && c1.getSector() == sector.AmareloEsverdeado ||
				c3.getSector() == sector.VermelhoAlaranjado && c1.getSector() == sector.AzulVioleta && c2.getSector() == sector.AmareloEsverdeado) {
			System.out.println("oe");
			return true;
		} 
		System.out.println("oe3");
		return false;
	}
	
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		System.out.print("Hue 1: ");
		int hue1 = sc.nextInt();
		
		System.out.println("Hue 2: ");
		int hue2 = sc.nextInt();
		
		System.out.println("Hue 3: ");
		int hue3 = sc.nextInt();
		
		if (mount(hue1, hue2, hue3)) {
			System.out.println("ok!");
		} else {
			System.out.println("not ok");
		}
	}
	
	public static boolean mount(int hue1, int hue2, int hue3) throws Exception {
		Color c1 = new Color(hue1);
		Color c2 = new Color(hue2);
		Color c3 = new Color(hue3);
		
		ThreeComplementary c = new ThreeComplementary(c1, c2, c3);
		
		if (c.isComplementary()) {
			return true;
		} else {
			return false;
		}
	}
}
